<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录页面</title>
<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
<script type="text/javascript">
	function check(){
		var username=$("#username").val();
		
		var a=username.match(/^[1][3|4|5|7|8][0-9]{9}$/);
		var i=username.match(/^[1]\d[2]\d$/);
		/* alert(a); */
		var r=username.match(/\d{3,5}?/g);
		var v=username.match(/^\d{3,5}$/g);
		var name=username.match(/^\w.\d{0,9}$/g);
		alert(name);
		/* alert(v); */
		 $.ajax({
			url:"login?username="+username,
			type:"post",
			data:username=username,
			success: function(data){
				alert(data);
				if(data){
					
					
				}
			},
			error:function(){
				
			}
		}); 
	};
	/* function checkk(){
		
		var password=$("#password").val();
		$.ajax({
			url:"login?password="+password,
			type:"post",
			data:password=password,
			success: function(data){
				alert(data);
				if(data){
					$("#pwd").html(data);
				}
			},
			error:function(){
				
			}
		});
	} */
</script>
<style type="text/css">
	#center{text-align:center;}
</style>
</head>
<body>
	<div id="center">
	<h2>登录</h2>
	<form action="login" method="post">
	<table align="center">
		<tr>
			<td>账号：</td>
			<td><input type="text" name="username" id="username" onblur="check();"></td>
		</tr>
		<tr>
			<td>密码：</td>
			<td><input type="password" name="password" id="password" onblur="checkk();" id="pwd"></td>
		</tr>
	</table>
	<br>	
	<input  type="submit" value="登录">
	</form>
	</div>
</body>
</html>